Integrand size = 15, antiderivative size = 95 \[ \int x \left (a+b x^3\right ) \sin (c+d x) \, dx=-\frac {24 b \cos (c+d x)}{d^5}-\frac {a x \cos (c+d x)}{d}+\frac {12 b x^2 \cos (c+d x)}{d^3}-\frac {b x^4 \cos (c+d x)}{d}+\frac {a \sin (c+d x)}{d^2}-\frac {24 b x \sin (c+d x)}{d^4}+\frac {4 b x^3 \sin (c+d x)}{d^2} \]
-24*b*cos(d*x+c)/d^5-a*x*cos(d*x+c)/d+12*b*x^2*cos(d*x+c)/d^3-b*x^4*cos(d* x+c)/d+a*sin(d*x+c)/d^2-24*b*x*sin(d*x+c)/d^4+4*b*x^3*sin(d*x+c)/d^2
Time = 0.07 (sec) , antiderivative size = 66, normalized size of antiderivative = 0.69 \[ \int x \left (a+b x^3\right ) \sin (c+d x) \, dx=\frac {-\left (\left (a d^4 x+b \left (24-12 d^2 x^2+d^4 x^4\right )\right ) \cos (c+d x)\right )+d \left (a d^2+4 b x \left (-6+d^2 x^2\right )\right ) \sin (c+d x)}{d^5} \]
(-((a*d^4*x + b*(24 - 12*d^2*x^2 + d^4*x^4))*Cos[c + d*x]) + d*(a*d^2 + 4* b*x*(-6 + d^2*x^2))*Sin[c + d*x])/d^5
Time = 0.31 (sec) , antiderivative size = 95, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {3820, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int x \left (a+b x^3\right ) \sin (c+d x) \, dx\) |
\(\Big \downarrow \) 3820 |
\(\displaystyle \int \left (a x \sin (c+d x)+b x^4 \sin (c+d x)\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {a \sin (c+d x)}{d^2}-\frac {a x \cos (c+d x)}{d}-\frac {24 b \cos (c+d x)}{d^5}-\frac {24 b x \sin (c+d x)}{d^4}+\frac {12 b x^2 \cos (c+d x)}{d^3}+\frac {4 b x^3 \sin (c+d x)}{d^2}-\frac {b x^4 \cos (c+d x)}{d}\) |
(-24*b*Cos[c + d*x])/d^5 - (a*x*Cos[c + d*x])/d + (12*b*x^2*Cos[c + d*x])/ d^3 - (b*x^4*Cos[c + d*x])/d + (a*Sin[c + d*x])/d^2 - (24*b*x*Sin[c + d*x] )/d^4 + (4*b*x^3*Sin[c + d*x])/d^2
3.1.81.3.1 Defintions of rubi rules used
Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*Sin[(c_.) + (d_.)*(x_ )], x_Symbol] :> Int[ExpandIntegrand[Sin[c + d*x], (e*x)^m*(a + b*x^n)^p, x ], x] /; FreeQ[{a, b, c, d, e, m, n}, x] && IGtQ[p, 0]
Time = 0.14 (sec) , antiderivative size = 69, normalized size of antiderivative = 0.73
method | result | size |
risch | \(-\frac {\left (b \,x^{4} d^{4}+a \,d^{4} x -12 d^{2} x^{2} b +24 b \right ) \cos \left (d x +c \right )}{d^{5}}+\frac {\left (4 b \,d^{2} x^{3}+a \,d^{2}-24 b x \right ) \sin \left (d x +c \right )}{d^{4}}\) | \(69\) |
parallelrisch | \(\frac {\left (\left (b \,x^{3}+a \right ) d^{2}-12 b x \right ) x \,d^{2} \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+2 \left (\left (4 b \,x^{3}+a \right ) d^{2}-24 b x \right ) d \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+\left (-b \,x^{4}-a x \right ) d^{4}+12 d^{2} x^{2} b -48 b}{d^{5} \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\) | \(109\) |
norman | \(\frac {\frac {a x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {b \,x^{4} \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {48 b}{d^{5}}+\frac {2 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d^{2}}-\frac {a x}{d}+\frac {12 b \,x^{2}}{d^{3}}-\frac {b \,x^{4}}{d}-\frac {48 b x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d^{4}}-\frac {12 b \,x^{2} \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d^{3}}+\frac {8 b \,x^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d^{2}}}{1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}\) | \(154\) |
parts | \(-\frac {b \,x^{4} \cos \left (d x +c \right )}{d}-\frac {a x \cos \left (d x +c \right )}{d}+\frac {a \sin \left (d x +c \right )-\frac {4 b \,c^{3} \sin \left (d x +c \right )}{d^{3}}+\frac {12 b \,c^{2} \left (\cos \left (d x +c \right )+\left (d x +c \right ) \sin \left (d x +c \right )\right )}{d^{3}}-\frac {12 b c \left (\left (d x +c \right )^{2} \sin \left (d x +c \right )-2 \sin \left (d x +c \right )+2 \cos \left (d x +c \right ) \left (d x +c \right )\right )}{d^{3}}+\frac {4 b \left (\left (d x +c \right )^{3} \sin \left (d x +c \right )+3 \left (d x +c \right )^{2} \cos \left (d x +c \right )-6 \cos \left (d x +c \right )-6 \left (d x +c \right ) \sin \left (d x +c \right )\right )}{d^{3}}}{d^{2}}\) | \(186\) |
meijerg | \(\frac {16 b \sqrt {\pi }\, \sin \left (c \right ) \left (-\frac {x \left (d^{2}\right )^{\frac {5}{2}} \left (-\frac {5 d^{2} x^{2}}{2}+15\right ) \cos \left (d x \right )}{10 \sqrt {\pi }\, d^{4}}+\frac {\left (d^{2}\right )^{\frac {5}{2}} \left (\frac {5}{8} d^{4} x^{4}-\frac {15}{2} d^{2} x^{2}+15\right ) \sin \left (d x \right )}{10 \sqrt {\pi }\, d^{5}}\right )}{d^{4} \sqrt {d^{2}}}+\frac {16 b \sqrt {\pi }\, \cos \left (c \right ) \left (\frac {3}{2 \sqrt {\pi }}-\frac {\left (\frac {3}{8} d^{4} x^{4}-\frac {9}{2} d^{2} x^{2}+9\right ) \cos \left (d x \right )}{6 \sqrt {\pi }}-\frac {d x \left (-\frac {3 d^{2} x^{2}}{2}+9\right ) \sin \left (d x \right )}{6 \sqrt {\pi }}\right )}{d^{5}}+\frac {2 a \sqrt {\pi }\, \sin \left (c \right ) \left (-\frac {1}{2 \sqrt {\pi }}+\frac {\cos \left (d x \right )}{2 \sqrt {\pi }}+\frac {d x \sin \left (d x \right )}{2 \sqrt {\pi }}\right )}{d^{2}}+\frac {2 a \sqrt {\pi }\, \cos \left (c \right ) \left (-\frac {d x \cos \left (d x \right )}{2 \sqrt {\pi }}+\frac {\sin \left (d x \right )}{2 \sqrt {\pi }}\right )}{d^{2}}\) | \(216\) |
derivativedivides | \(\frac {a c \cos \left (d x +c \right )+a \left (\sin \left (d x +c \right )-\cos \left (d x +c \right ) \left (d x +c \right )\right )-\frac {b \,c^{4} \cos \left (d x +c \right )}{d^{3}}-\frac {4 b \,c^{3} \left (\sin \left (d x +c \right )-\cos \left (d x +c \right ) \left (d x +c \right )\right )}{d^{3}}+\frac {6 b \,c^{2} \left (-\left (d x +c \right )^{2} \cos \left (d x +c \right )+2 \cos \left (d x +c \right )+2 \left (d x +c \right ) \sin \left (d x +c \right )\right )}{d^{3}}-\frac {4 b c \left (-\left (d x +c \right )^{3} \cos \left (d x +c \right )+3 \left (d x +c \right )^{2} \sin \left (d x +c \right )-6 \sin \left (d x +c \right )+6 \cos \left (d x +c \right ) \left (d x +c \right )\right )}{d^{3}}+\frac {b \left (-\left (d x +c \right )^{4} \cos \left (d x +c \right )+4 \left (d x +c \right )^{3} \sin \left (d x +c \right )+12 \left (d x +c \right )^{2} \cos \left (d x +c \right )-24 \cos \left (d x +c \right )-24 \left (d x +c \right ) \sin \left (d x +c \right )\right )}{d^{3}}}{d^{2}}\) | \(258\) |
default | \(\frac {a c \cos \left (d x +c \right )+a \left (\sin \left (d x +c \right )-\cos \left (d x +c \right ) \left (d x +c \right )\right )-\frac {b \,c^{4} \cos \left (d x +c \right )}{d^{3}}-\frac {4 b \,c^{3} \left (\sin \left (d x +c \right )-\cos \left (d x +c \right ) \left (d x +c \right )\right )}{d^{3}}+\frac {6 b \,c^{2} \left (-\left (d x +c \right )^{2} \cos \left (d x +c \right )+2 \cos \left (d x +c \right )+2 \left (d x +c \right ) \sin \left (d x +c \right )\right )}{d^{3}}-\frac {4 b c \left (-\left (d x +c \right )^{3} \cos \left (d x +c \right )+3 \left (d x +c \right )^{2} \sin \left (d x +c \right )-6 \sin \left (d x +c \right )+6 \cos \left (d x +c \right ) \left (d x +c \right )\right )}{d^{3}}+\frac {b \left (-\left (d x +c \right )^{4} \cos \left (d x +c \right )+4 \left (d x +c \right )^{3} \sin \left (d x +c \right )+12 \left (d x +c \right )^{2} \cos \left (d x +c \right )-24 \cos \left (d x +c \right )-24 \left (d x +c \right ) \sin \left (d x +c \right )\right )}{d^{3}}}{d^{2}}\) | \(258\) |
-(b*d^4*x^4+a*d^4*x-12*b*d^2*x^2+24*b)/d^5*cos(d*x+c)+1/d^4*(4*b*d^2*x^3+a *d^2-24*b*x)*sin(d*x+c)
Time = 0.26 (sec) , antiderivative size = 68, normalized size of antiderivative = 0.72 \[ \int x \left (a+b x^3\right ) \sin (c+d x) \, dx=-\frac {{\left (b d^{4} x^{4} + a d^{4} x - 12 \, b d^{2} x^{2} + 24 \, b\right )} \cos \left (d x + c\right ) - {\left (4 \, b d^{3} x^{3} + a d^{3} - 24 \, b d x\right )} \sin \left (d x + c\right )}{d^{5}} \]
-((b*d^4*x^4 + a*d^4*x - 12*b*d^2*x^2 + 24*b)*cos(d*x + c) - (4*b*d^3*x^3 + a*d^3 - 24*b*d*x)*sin(d*x + c))/d^5
Time = 0.32 (sec) , antiderivative size = 116, normalized size of antiderivative = 1.22 \[ \int x \left (a+b x^3\right ) \sin (c+d x) \, dx=\begin {cases} - \frac {a x \cos {\left (c + d x \right )}}{d} + \frac {a \sin {\left (c + d x \right )}}{d^{2}} - \frac {b x^{4} \cos {\left (c + d x \right )}}{d} + \frac {4 b x^{3} \sin {\left (c + d x \right )}}{d^{2}} + \frac {12 b x^{2} \cos {\left (c + d x \right )}}{d^{3}} - \frac {24 b x \sin {\left (c + d x \right )}}{d^{4}} - \frac {24 b \cos {\left (c + d x \right )}}{d^{5}} & \text {for}\: d \neq 0 \\\left (\frac {a x^{2}}{2} + \frac {b x^{5}}{5}\right ) \sin {\left (c \right )} & \text {otherwise} \end {cases} \]
Piecewise((-a*x*cos(c + d*x)/d + a*sin(c + d*x)/d**2 - b*x**4*cos(c + d*x) /d + 4*b*x**3*sin(c + d*x)/d**2 + 12*b*x**2*cos(c + d*x)/d**3 - 24*b*x*sin (c + d*x)/d**4 - 24*b*cos(c + d*x)/d**5, Ne(d, 0)), ((a*x**2/2 + b*x**5/5) *sin(c), True))
Leaf count of result is larger than twice the leaf count of optimal. 224 vs. \(2 (95) = 190\).
Time = 0.19 (sec) , antiderivative size = 224, normalized size of antiderivative = 2.36 \[ \int x \left (a+b x^3\right ) \sin (c+d x) \, dx=\frac {a c \cos \left (d x + c\right ) - \frac {b c^{4} \cos \left (d x + c\right )}{d^{3}} - {\left ({\left (d x + c\right )} \cos \left (d x + c\right ) - \sin \left (d x + c\right )\right )} a + \frac {4 \, {\left ({\left (d x + c\right )} \cos \left (d x + c\right ) - \sin \left (d x + c\right )\right )} b c^{3}}{d^{3}} - \frac {6 \, {\left ({\left ({\left (d x + c\right )}^{2} - 2\right )} \cos \left (d x + c\right ) - 2 \, {\left (d x + c\right )} \sin \left (d x + c\right )\right )} b c^{2}}{d^{3}} + \frac {4 \, {\left ({\left ({\left (d x + c\right )}^{3} - 6 \, d x - 6 \, c\right )} \cos \left (d x + c\right ) - 3 \, {\left ({\left (d x + c\right )}^{2} - 2\right )} \sin \left (d x + c\right )\right )} b c}{d^{3}} - \frac {{\left ({\left ({\left (d x + c\right )}^{4} - 12 \, {\left (d x + c\right )}^{2} + 24\right )} \cos \left (d x + c\right ) - 4 \, {\left ({\left (d x + c\right )}^{3} - 6 \, d x - 6 \, c\right )} \sin \left (d x + c\right )\right )} b}{d^{3}}}{d^{2}} \]
(a*c*cos(d*x + c) - b*c^4*cos(d*x + c)/d^3 - ((d*x + c)*cos(d*x + c) - sin (d*x + c))*a + 4*((d*x + c)*cos(d*x + c) - sin(d*x + c))*b*c^3/d^3 - 6*((( d*x + c)^2 - 2)*cos(d*x + c) - 2*(d*x + c)*sin(d*x + c))*b*c^2/d^3 + 4*((( d*x + c)^3 - 6*d*x - 6*c)*cos(d*x + c) - 3*((d*x + c)^2 - 2)*sin(d*x + c)) *b*c/d^3 - (((d*x + c)^4 - 12*(d*x + c)^2 + 24)*cos(d*x + c) - 4*((d*x + c )^3 - 6*d*x - 6*c)*sin(d*x + c))*b/d^3)/d^2
Time = 0.31 (sec) , antiderivative size = 69, normalized size of antiderivative = 0.73 \[ \int x \left (a+b x^3\right ) \sin (c+d x) \, dx=-\frac {{\left (b d^{4} x^{4} + a d^{4} x - 12 \, b d^{2} x^{2} + 24 \, b\right )} \cos \left (d x + c\right )}{d^{5}} + \frac {{\left (4 \, b d^{3} x^{3} + a d^{3} - 24 \, b d x\right )} \sin \left (d x + c\right )}{d^{5}} \]
-(b*d^4*x^4 + a*d^4*x - 12*b*d^2*x^2 + 24*b)*cos(d*x + c)/d^5 + (4*b*d^3*x ^3 + a*d^3 - 24*b*d*x)*sin(d*x + c)/d^5
Time = 6.11 (sec) , antiderivative size = 92, normalized size of antiderivative = 0.97 \[ \int x \left (a+b x^3\right ) \sin (c+d x) \, dx=-\frac {d^4\,\left (a\,x\,\cos \left (c+d\,x\right )+b\,x^4\,\cos \left (c+d\,x\right )\right )+24\,b\,\cos \left (c+d\,x\right )-d^3\,\left (a\,\sin \left (c+d\,x\right )+4\,b\,x^3\,\sin \left (c+d\,x\right )\right )+24\,b\,d\,x\,\sin \left (c+d\,x\right )-12\,b\,d^2\,x^2\,\cos \left (c+d\,x\right )}{d^5} \]